package com.tanhua.sso.controller;

import com.tanhua.sso.service.UserInfoService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile;

import java.util.Map;

@RestController
@RequestMapping("/user")
public class UserInfoController {
    @Autowired
    private UserInfoService userInfoService;

    @PostMapping("/loginReginfo")
    public Object loginRegInfo(@RequestBody Map<String, String> param,@RequestHeader("Authorization") String token) {
        return this.userInfoService.loginRegInfo(param,token);
    }

    @PostMapping("/loginReginfo/head")
    public Object loginRegInfoHead(
                                   @RequestHeader("Authorization") String token,
                                   @RequestParam("headPhoto") MultipartFile multipartFile) {
        return this.userInfoService.loginRegInfoHead(token,multipartFile);
    }
}
